package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * @author 衷岚
 * @version 1.0
 */
@Mapper
public interface UserMapper {
    @Select("select * from user where openid=#{openid}")
    User findByOpenid(String openid);


    void add(User user);

    @Select("select * from user where id=#{id}")
    User findById(Long id);

    /**
     * 查询特定时间用户数量
     * @param map
     * @return
     */
    Integer sumByMap(HashMap<String, Object> map);
}
